﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Collections;
namespace ConsoleApplication1
{
    class Program
    {
        static string[,] Muss()
        {
            int k = 0;
            string s = File.ReadAllText(@"TextFile1.txt");
            string[] str1 = File.ReadAllLines(@"TextFile1.txt");
            string[] str2 = str1[0].Split(' ');
            string[,] a = new string[str1.Length, str2.Length];
            string[] str = s.Split(' ','\n');
            for (int i = 0; i < str1.Length; i++)
            {
                for (int j = 0; j < str2.Length; j++)
                {
                    a[i, j] = str[k];
                    k++;
                }
            }
            return a;
        }
        static void Set1(string[,] a)
        {
            for (int i = 0; i < a.GetLength(0); i++)
            {
                for (int j = 0; j < a.GetLength(1); j++)
                {
                    Console.Write(a[i, j] + " ");
                }
                Console.WriteLine();
            }
            Console.ReadLine();
        }
        static void Main(string[] args)
        {
            string[,] a = Muss();
            Console.WriteLine("Вывод массива =)");
            Set1(a);
        }
    }
}